﻿using System;

namespace Demo5
{
    class Program
    {
        static void Main(string[] args)
        {
            
            Random a = new Random();
            int[] arr = new int[10];
            for (int i = 0; i < 10; i++)
            {
                arr[i] = a.Next(10);
                Console.Write(arr[i]+"||");
                if (i>=1)
                {
                    for (int j = 0; j < i-1; j++)
                    {
                        if (arr[i] == arr[j])
                        {
                            i--;
                        }
                    }
                }
            }
            //Console.WriteLine("");
            //for (int i = 0; i < arr.Length; i++)
            //{
            //    Console.Write(i+"||" + arr[i]);
            //}
        }
    }
}
